<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	

<h:head>
<link href="../resources/css/admin.css" rel="stylesheet" type="text/css" />
</h:head>


<h:body>
	<div class="contenitore">
 		<div class="riga">
  			<div class="colonna-1">
				<img id="immagine" src="../resources/images/logo.jpg" alt="" />
				
  			</div>
  			<div class="colonna-1-2">
  				<h1>Administration Panel</h1>	
 				<h:outputText id="welcometext" value="Pannello dedicato alla gestione e creazione dei contenuti del sito TravelDream"></h:outputText>
  			</div>
 		</div>
 		
 		<div id="riga2">
  			<div class="colonna-2-1">
  				<h:form>
						<p:commandButton action="#{logoutBean.logout}" value="Logout" />
				</h:form>
  			</div>
  			<div class="colonna-2-2">
  				<h:form>  
    				<p:dataTable var="package" value="#{showPacchettoBean.pacchetti}" tableStyle="width:auto">  
       					<p:column headerText="#ID">  
            				<h:outputText value="#{package.id}" />  
        				</p:column> 
        				
       					<p:column headerText="Nome">  
            				<h:outputText value="#{package.nome}" />  
        				</p:column>  
  
  						
       					<p:column headerText="Descrizione">  
            				<h:outputText value="#{package.descrizione}" />  
        				</p:column>  
         
        				<p:column headerText="Città">  
            				<h:outputText value="#{package.citta}" />  
        				</p:column>  
        				
        				<p:column headerText="Durata">  
            				<h:outputText value="#{package.durataviaggio}" />  
        				</p:column>
  
        				<p:column headerText="Prezzo(€)">  
            				<h:outputText value="#{package.prezzo}" />  
        				</p:column>  
        				
        				<p:column headerText="InOfferta">  
            				<h:outputText value="#{package.inOfferta}" />  
        				</p:column>  
        				
        				<p:column headerText="Disp.">  
            				<h:outputText value="#{package.disponibile}" />  
        				</p:column>
        				
        				<p:column headerText="Hotel">
							<p:dataTable var="hotel" value="#{package.hotel}">
								<p:column headerText="Nome">
									<h:outputText value="#{hotel.name}" />
								</p:column>
								<p:column headerText="Stelle">
									<h:outputText value="#{hotel.stelle}" />
								</p:column>
								<p:column headerText="Prezzo">
									<h:outputText value="#{hotel.price}" />
								</p:column>
								
							</p:dataTable>	
        					
        				</p:column>
        				
        				<p:column headerText="Escursione">
							<p:dataTable var="escursione" value="#{package.escursioni}">
								<p:column headerText="Nome">
									<h:outputText value="#{escursione.name}" />
								</p:column>
								
								<p:column headerText="Prezzo">
									<h:outputText value="#{escursione.price}" />
								</p:column>
								
							</p:dataTable>	
        					
        				</p:column>
        				
        				<p:column headerText="VoliAndata">
							<p:dataTable var="voli" value="#{package.voliandata}">
								<p:column headerText="Nome">
									<h:outputText value="#{voli.nome}" />
								</p:column>
								<p:column headerText="Da">
									<h:outputText value="#{voli.cittaPartenza}" />
								</p:column>
								<p:column headerText="A">
									<h:outputText value="#{voli.cittaArrivo}" />
								</p:column>
								<p:column headerText="Partenza">
									<h:outputText value="#{voli.dataPartenza}" />
								</p:column>
								
							</p:dataTable>	
        					
        				</p:column>
        				
        				<p:column headerText="VoliRitorno">
							<p:dataTable var="voli" value="#{package.voliritorno}">
								<p:column headerText="Nome">
									<h:outputText value="#{voli.nome}" />
								</p:column>
								<p:column headerText="Da">
									<h:outputText value="#{voli.cittaPartenza}" />
								</p:column>
								<p:column headerText="A">
									<h:outputText value="#{voli.cittaArrivo}" />
								</p:column>
								<p:column headerText="Partenza">
									<h:outputText value="#{voli.dataPartenza}" />
								</p:column>
								
							</p:dataTable>	
        					
        				</p:column>
        				
        				<p:column>
        					<p:commandButton value="Modifica" action="#{infoPacchettoAdminBean.outcome()}">	
    			        		<f:param name="action" value="#{package.id}" />
    			    		</p:commandButton>
    			    	</p:column>	
        						
        
    				</p:dataTable>  
</h:form> 
  				
  			</div>
  			<div class="colonna-2-3">
  				
  			
  			</div>
 		</div>
 	</div>
</h:body>
</html>